package Z.dailyExercise.March;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class _190_颠倒二进制位 {
    public static void main(String[] args) throws IOException {
        //BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner s = new Scanner(System.in);
        while (s.hasNext()){
            int num = s.nextInt();
            reverseBits(num);
        }

    }



    public static void reverseBits(int n){
        int round = 0;

        int index = 0;
        while (round++<32){

            index <<= 1;
            index += (n&1);
            n >>= 1;
        }

    }
}
